﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes {

    public class PlayerNews {

        public static const NEWSTYPE_VISITED:String = "v";
        public static const NEWSTYPE_GIFT_SENT:String = "gs";
        public static const NEWSTYPE_GIFT_ACCEPTED:String = "ga";

        public var ver:int;
        public var senderId:String;
        public var senderName:String;
        public var type:String;
        public var object:String;
        public var timestampMs:Number;

        public function PlayerNews(_arg1:Object){
            if ((((_arg1.ver == null)) || ((int(_arg1.ver) <= 1)))){
                this.ver = 1;
                this.senderId = String(_arg1.senderId);
                this.senderName = String(_arg1.senderName);
                this.type = String(_arg1.type);
                this.object = String(_arg1.object);
                this.timestampMs = (Number(_arg1.timestamp) * 1000);
            };
        }
        public static function loadFromObjects(_arg1:Array):Array{
            var defs:* = _arg1;
            return (defs.map(function (_arg1:Object, ... _args):PlayerNews{
                return (new PlayerNews(_arg1));
            }));
        }

    }
}//package Classes 
